﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DesignPatternTest.Adapter
{
    // "Target" 
    public class Target
    {
        public virtual void Request()
        {
            Console.WriteLine("Called Target Request()");
        }
    }

    // "Adapter" 
    public class Adapter : Target
    {
        private Adaptee adaptee = new Adaptee();

        public override void Request()
        {
            // Possibly do some other work 
            // and then call SpecificRequest 
            adaptee.SpecificRequest();
        }
    }

    // "Adaptee" 
    public class Adaptee
    {
        public void SpecificRequest()
        {
            Console.WriteLine("Called SpecificRequest()");
        }
    }
}
